package com.ruoyi.web.controller.teacher;


import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.teacher.domain.Dictionarys;
import com.ruoyi.teacher.domain.Label;
import com.ruoyi.teacher.mapper.DeyRepository;
import com.ruoyi.teacher.service.LabelServie;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/system/label")
public class LabelController {

    @Autowired
    private LabelServie labelServie;

    @Autowired
    private DeyRepository deyRepository;

    @GetMapping("/list")
    public AjaxResult labelList() {
        List<Label> list = labelServie.getList();
        return AjaxResult.success("200", list);
    }

    @GetMapping("/day")
    public AjaxResult dayList() {
        List<Dictionarys> all = deyRepository.findAll();
        return AjaxResult.success("200", all);
    }
}
